package com.shuda.common.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;

/**
 * 用户DTO
 */
@Data
@Schema(description = "用户DTO")
public class UserDTO {

    @Schema(description = "用户ID")
    private Long id;

    @NotBlank(message = "用户名不能为空")
    @Size(min = 3, max = 20, message = "用户名长度必须在3-20位之间")
    @Schema(description = "用户名")
    private String username;

    @NotBlank(message = "昵称不能为空")
    @Size(max = 50, message = "昵称长度不能超过50位")
    @Schema(description = "昵称")
    private String nickname;

    @Size(max = 50, message = "真实姓名长度不能超过50位")
    @Schema(description = "真实姓名")
    private String realName;

    @Email(message = "邮箱格式不正确")
    @Size(max = 100, message = "邮箱长度不能超过100位")
    @Schema(description = "邮箱")
    private String email;

    @Size(max = 11, message = "手机号长度不能超过11位")
    @Schema(description = "手机号")
    private String phone;

    @Schema(description = "状态（0正常 1停用）")
    private String status;

    @Schema(description = "部门ID")
    private Long deptId;

    @Schema(description = "角色ID")
    private Long roleId;

    @Schema(description = "备注")
    private String remark;
}